﻿<!DOCTYPE HTML>
<html lang="zh">
<head>
<title>MenuFromHandle - 语法 &amp; 使用 | AutoHotkey v2</title>
<meta name="description" content="The MenuFromHandle function retrieves the Menu or MenuBar object corresponding to a Win32 menu handle." />
<meta name="ahk:equiv-v1" content="commands/Menu.htm" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<link href="../static/theme.css" rel="stylesheet" type="text/css" />
<script src="../static/content.js" type="text/javascript"></script>
<script type="text/javascript">$(function(){0<=window.navigator.userAgent.toLowerCase().indexOf("ucbrowser")&&CaoNiMaDeUc()})</script>
</head>
<body>

<h1>MenuFromHandle</h1>

<p>检索对应于 Win32 菜单句柄的<a href="../objects/Menu.htm">菜单或菜单栏对象</a>.</p>

<pre class="Syntax">Menu := <span class="func">MenuFromHandle</span>(Handle)</pre>
<h2 id="Parameters">参数</h2>
<dl>
  <dt>Handle</dt><dd>
    <p>类型: <a href="../Concepts.htm#numbers">整数</a></p>
    <p>返回 Win32 菜单的句柄(类型为 <code>HMENU</code>).</p>
  </dd>
</dl>

<h2 id="Remarks">备注</h2>
<p>如果句柄无效或与此脚本创建的菜单不对应, 则该函数返回一个空字符串.</p>

<h2 id="Related">相关</h2>
<p><a href="../objects/Menu.htm#Win32_Menus">Win32 菜单</a>, <a href="../objects/Menu.htm">Menu/MenuBar 对象</a>, <a href="../objects/Menu.htm#Handle">Menu.Handle</a>, <a href="../objects/Menu.htm#Call">Menu()</a></p>

</body>
</html>